package com.itheima.mall.controller.omsController;

import com.itheima.mall.service.omsService.OmsCompanyAddressService;
import com.itheima.mall.service.omsService.OmsOrderService;
import com.itheima.pojo.oms.OmsCompanyAddress;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {
    @Autowired
    private OmsCompanyAddressService omsCompanyAddressService;

    @GetMapping("/list")
    public ResponseEntity<List<OmsCompanyAddress>> list() {

        List<OmsCompanyAddress> lists = omsCompanyAddressService.list();
        return ResponseEntity.ok(lists);
    }


}
